package com.example.wechat.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.project.core.text.Convert;
import com.example.wechat.mapper.WechatConversationMemberMapper;
import com.example.wechat.model.WechatConversationMember;
import com.example.wechat.service.WechatConversationMemberService;

/**
 * 会话成员关系Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-12
 */
@Service
public class WechatConversationMemberService {

	@Autowired
	private WechatConversationMemberMapper wechatConversationMemberMapper;

	/**
	 * 查询会话成员关系
	 * 
	 * @param id 会话成员关系主键
	 * @return 会话成员关系
	 */

	public WechatConversationMember selectWechatConversationMemberById(Long id) {
		return wechatConversationMemberMapper.selectWechatConversationMemberById(id);
	}

	/**
	 * 查询会话成员关系列表
	 * 
	 * @param wechatConversationMember 会话成员关系
	 * @return 会话成员关系
	 */

	public List<WechatConversationMember> selectWechatConversationMemberList(
			WechatConversationMember wechatConversationMember) {
		return wechatConversationMemberMapper.selectWechatConversationMemberList(wechatConversationMember);
	}

	/**
	 * 新增会话成员关系
	 * 
	 * @param wechatConversationMember 会话成员关系
	 * @return 结果
	 */

	public int insertWechatConversationMember(WechatConversationMember wechatConversationMember) {
		return wechatConversationMemberMapper.insertWechatConversationMember(wechatConversationMember);
	}

	/**
	 * 修改会话成员关系
	 * 
	 * @param wechatConversationMember 会话成员关系
	 * @return 结果
	 */

	public int updateWechatConversationMember(WechatConversationMember wechatConversationMember) {
		return wechatConversationMemberMapper.updateWechatConversationMember(wechatConversationMember);
	}

	/**
	 * 批量删除会话成员关系
	 * 
	 * @param ids 需要删除的会话成员关系主键
	 * @return 结果
	 */

	public int deleteWechatConversationMemberByIds(String ids) {
		return wechatConversationMemberMapper.deleteWechatConversationMemberByIds(Convert.toStrArray(ids));
	}

	/**
	 * 删除会话成员关系信息
	 * 
	 * @param id 会话成员关系主键
	 * @return 结果
	 */

	public int deleteWechatConversationMemberById(Long id) {
		return wechatConversationMemberMapper.deleteWechatConversationMemberById(id);
	}
}
